package com.xian.type;

public class TypeDemo1 {

    //目标：自动类型转换---小的转化为大的

    //byte,short,char--->int--->long--->float--->double

    public static void main(String[] args) {
        byte a = 20;
        int b = a;   //发生了自动类型转换 小-->大

        System.out.println(a);
        System.out.println(b);

        int age = 23;
        double db = age;  //发生了自动类型转换
        System.out.println(age);
        System.out.println(db);

        char ch = 'a';
        int code = ch;

        System.out.println(ch);
        System.out.println(code);
    }
}
